package com.leiqichao.backend.entity;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;
import java.time.LocalDateTime;

@Data
@TableName("media")
public class Media {
    @TableId(type = IdType.AUTO)
    private Long id;
    @TableField("name") private String name;
    @TableField("path") private String path;
    @TableField("mime_type") private String mimeType;
    @TableField("size") private Long size;
    @TableField("uploader_name") private String uploaderName;
    @TableLogic @TableField("is_deleted") private Boolean isDeleted = false;
    @TableField(value = "created_at", fill = FieldFill.INSERT) private LocalDateTime createdAt;
    @TableField(value = "updated_at", fill = FieldFill.INSERT_UPDATE) private LocalDateTime updatedAt;
}